home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat2 / Pterm.2 < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. PTERM(2)                MiNT SYSTEM CALLS                PTERM(2)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        Pterm, Pterm0, Ptermres - terminate current process
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        #include <osbind.h>
  12.  
  13.        void Pterm(int retcode);
  14.  
  15.        void Pterm0(void);
  16.  
  17.        void Ptermres(long keepcnt, int retcode);
  18.  
  19. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  20.        Pterm,  Ptermres and Pterm0 terminate the current process.
  21.        All open files will be closed, all structures owned by the
  22.        process  will  be  released  and  freed.  Pterm and Pterm0
  23.        return all  Malloc-ed  memory  to  the  Operating  System.
  24.        Ptermres  keeps  keepcnt  bytes, counted from the start of
  25.        the basepage, resident; this can be used for TSR programs.
  26.  
  27.        Either  retcode (Pterm, Ptermres) or zero (Pterm0) will be
  28.        returned to the calling process.  By  convention,  a  zero
  29.        return  code  means  success, a non-zero return code means
  30.        failure.
  31.  
  32.        If set, the interrupt  vector  for  terminating  processes
  33.        (etv_term,  located  at $0408) will be called by Pterm and
  34.        Pterm0 before the process cleanup code is run. This can be
  35.        used to restore changed vectors and so on.
  36.  
  37. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  38.        P✓Pe✓ex✓xe✓ec✓c(✓(2✓2)✓)
  39.  
  40. N✓NO✓OT✓TE✓E
  41.        Ptermres does not jump through etv_term.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. MiNT docs 0.1              3 March 1993                         1
  65.  
  66.  
  67.